package com.mm.cme.kotlin_001.level02.i_001_class

/**
 * Descriptions：基本运算符
 * <p>
 * Author：ChenME
 * Date：2017/7/16
 * Email：ibelieve1210@163.com
 */
class Complex(var real: Double, var imginry: Double) {

    operator fun plus(other: Complex): Complex {
        return Complex(real + other.real, imginry + other.imginry)
    }

    override fun toString(): String {
        return "$real + ${imginry}i"
    }

}


class Book {
    //中缀表达式
    infix fun on(any: Any): Boolean {
        return false
    }
}

class Desk


fun main(args: Array<String>) {

//    val c1 = Complex(3.0, 4.0)
//    val c2 = Complex(2.0, 7.5)
//    pl(c1 + c2)

    if (Book() on Desk()) {

    }
}